#!/usr/bin/python
# update time spent for all tasks
# thomasballinger@gmail.com

import os, sys, optparse

import calendarhours as hours
import gssltask as task

task_list = task.createTasks()
for t in task_list:
    print 'updating',t.name,t.timespent,
    t.timespent = hours.get_hours_worked(t.id)
    print 'to', t.timespent
    t.put()
